package com.baijiayun.live.ui.toolbox.announcement.modelui;

import com.baijiayun.live.ui.activity.LiveRoomRouterListener;
import com.baijiayun.livecore.models.imodels.IAnnouncementModel;

import io.reactivex.disposables.Disposable;

/**
 *  公告/分组编辑
 *  panzq
 *  20190708
 */
public class EditAnnPresenter implements EditAnnContract.Presenter, IAnnouncementUI{

    private boolean isGroup = true;
    private EditAnnContract.View mView;
    private LiveRoomRouterListener mRouter;

    private Disposable subscriptionOfAnnouncementChange;
    private IAnnouncementModel iAnnModel;

    public EditAnnPresenter(EditAnnContract.View view, boolean isGroup, IAnnouncementModel iAnnouncementModel) {
        this.mView = view;
        this.isGroup = isGroup;
        this.iAnnModel = iAnnouncementModel;
    }

    @Override
    public void setRouter(LiveRoomRouterListener liveRoomRouterListener) {
        this.mRouter = liveRoomRouterListener;
    }

    @Override
    public void subscribe() {
        mView.initInfo(iAnnModel);
    }

    @Override
    public void unSubscribe() {
        // do nothing
    }

    @Override
    public void destroy() {
        // do nothing
    }

    @Override
    public void setNoticeInfo(IAnnouncementModel iAnnouncementModel) {
        // do nothing
    }

    @Override
    public NoticeInfo getNotice() {
        return mView.getNoticeInfo();
    }
}
